%Version 3 October 2023
% See section 11 of the User Manual for version history
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                 %%
%% Please do not use \input{...} to include other tex files.       %%
%% Submit your LaTeX manuscript as one .tex document.              %%
%%                                                                 %%
%% All additional figures and files should be attached             %%
%% separately and not embedded in the \TeX\ document itself.       %%
%%                                                                 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%\documentclass[referee,sn-basic]{sn-jnl}% referee option is meant for double line spacing

%%=======================================================%%
%% to print line numbers in the margin use lineno option %%
%%=======================================================%%

%%\documentclass[lineno,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style

%%======================================================%%
%% to compile with pdflatex/xelatex use pdflatex option %%
%%======================================================%%

%%\documentclass[pdflatex,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style


%%Note: the following reference styles support Namedate and Numbered referencing. By default the style follows the most common style. To switch between the options you can add or remove �Numbered� in the optional parenthesis. 
%%The option is available for: sn-basic.bst, sn-vancouver.bst, sn-chicago.bst%  
 
%%\documentclass[sn-nature]{sn-jnl}% Style for submissions to Nature Portfolio journals
\documentclass[sn-basic, Numbered, UTF8]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style
% \documentclass[sn-mathphys-num]{sn-jnl}% Math and Physical Sciences Numbered Reference Style 
%%\documentclass[sn-mathphys-ay]{sn-jnl}% Math and Physical Sciences Author Year Reference Style
%%\documentclass[sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%\documentclass[sn-vancouver,Numbered]{sn-jnl}% Vancouver Reference Style
%%\documentclass[sn-apa]{sn-jnl}% APA Reference Style 
%%\documentclass[sn-chicago]{sn-jnl}% Chicago-based Humanities Reference Style

%%%% Standard Packages
%%<additional latex packages if required can be included here>

\usepackage{graphicx}%
\usepackage{multirow}%
\usepackage{amsmath,amssymb,amsfonts}%
\usepackage{amsthm}%
\usepackage{mathrsfs}%
\usepackage[title]{appendix}%
\usepackage{xcolor}%
\usepackage{textcomp}%
\usepackage{manyfoot}%
\usepackage{booktabs}%
\usepackage{algorithm}%
\usepackage{algorithmicx}%
\usepackage{algpseudocode}%
\usepackage{listings}%
\usepackage{adjustbox}
\usepackage{hhline}
\usepackage{natbib}
%%%%

%%%%%=============================================================================%%%%
%%%%  Remarks: This template is provided to aid authors with the preparation
%%%%  of original research articles intended for submission to journals published 
%%%%  by Springer Nature. The guidance has been prepared in partnership with 
%%%%  production teams to conform to Springer Nature technical requirements. 
%%%%  Editorial and presentation requirements differ among journal portfolios and 
%%%%  research disciplines. You may find sections in this template are irrelevant 
%%%%  to your work and are empowered to omit any such section if allowed by the 
%%%%  journal you intend to submit to. The submission guidelines and policies 
%%%%  of the journal take precedence. A detailed User Manual is available in the 
%%%%  template package for technical guidance.
%%%%%=============================================================================%%%%

%% as per the requirement new theorem styles can be included as shown below
\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}%  meant for continuous numbers
%%\newtheorem{theorem}{Theorem}[section]% meant for sectionwise numbers
%% optional argument [theorem] produces theorem numbering sequence instead of independent numbers for Proposition
\newtheorem{proposition}[theorem]{Proposition}% 
%%\newtheorem{proposition}{Proposition}% to get separate numbers for theorem and proposition etc.

\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%

\raggedbottom
%%\unnumbered% uncomment this for unnumbered level heads

\begin{document}

\title[Article Title]{Global Graph and Hypergraph Attention Networks for session-based recommendation}

%%=============================================================%%
%% GivenName	-> \fnm{Joergen W.}
%% Particle	-> \spfx{van der} -> surname prefix
%% FamilyName	-> \sur{Ploeg}
%% Suffix	-> \sfx{IV}
%% \author*[1,2]{\fnm{Joergen W.} \spfx{van der} \sur{Ploeg} 
%%  \sfx{IV}}\email{iauthor@gmail.com}
%%=============================================================%%

\author*[1]{\fnm{Hui Wang} \sur{}}\email{9320090328@jxust.edu.cn}

\author[1]{\fnm{Junjie You} \sur{}}\email{6120230746@mail.jxust.edu.cn}
% \equalcont{These authors contributed equally to this work.}

\author[1]{\fnm{Jianbing Yi} \sur{}}\email{yijianbing8@jxust.edu.cn}
% \equalcont{These authors contributed equally to this work.}

\author[1]{\fnm{Junyan Liu} \sur{}}\email{6120230749@mail.jxust.edu.cn}
\author[1]{\fnm{Runjie Huang} \sur{}}\email{6720230775@mail.jxust.edu.cn}


\affil*[1]{\orgdiv{School of Information Engineering}, \orgname{Jiangxi University of Science and Technology}, \orgaddress{\city{Ganzhou}, \postcode{341000}, \country{China}}}

%%==================================%%
%% Sample for unstructured abstract %%
%%==================================%%

\abstract{
    The session-based recommendation aims to model anonymous behavioral sequences to learn users' preferences and recommend items for them. 
    Recently, the application of graph neural networks (GNN) in SBR has brought new advances. 
    However, existing GNN-based methods only focus on the learning of item embedding within a session, ignoring common user preferences across sessions. 
    Hypergraph is able to model higher-order information through many-to-many relationships at the session-level, and its potential in SBR has great space for improvement. 
    Therefore, in this paper, we propose a GHAN to improve SBR on session representation learning by modeling session data as hypergraphs. 
    In addition, we further enhance the construction of global graphs based on context learning and design a Weighted global graph attention network to learn users' global preferences more efficiently.
    Experiments on three benchmark datasets show that our proposed GHAN can effectively improve recommendation performance, 
    consistently outperforming state-of-the-art methods. 
}

%%================================%%
%% Sample for structured abstract %%
%%================================%%

% \abstract{\textbf{Purpose:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.
% 
% \textbf{Methods:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.
% 
% \textbf{Results:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.
% 
% \textbf{Conclusion:} The abstract serves both as a general introduction to the topic and as a brief, non-technical summary of the main results and their implications. The abstract must not include subheadings (unless expressly permitted in the journal's Instructions to Authors), equations or citations. As a guide the abstract should not exceed 200 words. Most journals do not set a hard limit however authors are advised to check the author instructions for the journal they are submitting to.}

\keywords{Session-based recommendation, Graph attention network, Global graph, Hypergraph}

%%\pacs[JEL Classification]{D8, H51}

%%\pacs[MSC Classification]{35A01, 65L10, 65L12, 65L20, 65L70}

\maketitle

\section{Introduction}\label{sec1}
\par{
    Recommendation systems are an important strategy for online platforms to help users quickly find interesting products, which can effectively solve problems such as information overload \cite{DLBRS-SP}. 
    In general recommendation scenarios, 
    recommendation algorithms mainly rely on the user's personal information and the content of long-term interactions with online platforms to learn user preferences.
    However, in practical applications, it is necessary to face situations such as users without logging in, which makes it impossible to obtain complete user information. 
    In this case, a session-based recommender system \cite{PRNNAF, GraphAIR, SR-GNN, GCE-GNN} that makes instant recommendations based on the user's short-term behavior can effectively solve the above problems.
    It makes recommendations by temporally arranging the user's interaction items with the platform as a sequence of sessions and predicting the next interaction item for each session.
}
\par{
    In many of existing researches \cite{GRU4REC, STAMP, NARM, Quadrana_2017, ZHANG2020165}, 
    it is based on RNN, due to the sequential features of a session that can be captured by RNN with ease. 
    Recently, GNN-based research \cite{SR-GNN, GCE-GNN, TA-GNN, Disen-GNN, GS-GNN, PA-GNN, E-GNN}
    in SBR has achieved significant progress by converting session sequences into graph structures and various graph neural networks to learn the item embedding feature.
    In addition, extensions such as attention mechanism \cite{NARM, STAMP} and context learning \cite{GCE-GNN, GS-GNN} have been used to capture potential item transition patterns.
}
\par{
    Most of the existing methods focus on the learning of item embedding, 
    and rely only on the linear combination of item embedding in session representation learning, ignoring session-level relationship learning. 
    Moreover, item transitions are triggered by users under the joint effect of clicking on previous items, 
    and obviously a many-to-many relationship exists between items \cite{DHCN}. 
    The traditional method of combining pairs of item transfers into a graph is unable to reflect the above relationship pattern. 
    For this reason, a new graph at the session-level could be constructed to solve the above problem.
}
\par{
    In addition, existing global graph-based context learning methods aim to capture the transfer patterns of items within the current session with other session items. 
    Although researchers have made significant progress in contextual relationship construction in existing methods \cite{GCE-GNN, GS-GNN}, there are still some limitations. 
    Traditional approaches focus on learning the direct relationship between items and their global neighbors, 
    with only the relationship representation from global neighbors to current session items, 
    ignoring the neighbor sharing and transferring direction information. This may lead to, 
    e.g., the relationship between a phone and a phone case being represented as unfolding with the phone case as the center, 
    but the phone is the product that the user is most interested in. 
    Therefore, accurately identifying the association information of items can help model more real user preferences.
}
\par{
    To this end, we propose a Global Graph and Hypergraph Attention Networks (GHAN) for session-based recommendation. 
    Specifically, we enhance session-based recommendation through two aspects. 
    First, a hypergraph is built at the session-level based on session similarity to represent many-to-many relationships. 
    The hypergraph is utilized on session representation to learn common user preferences. 
    Second, to accurately represent the transfer relationship of items, we construct the interactions of all items as a global graph. 
    Then, we slice and weight the global graph to obtain a weighted global graph corresponding to the current session. 
    The transition probability of items in the weighted global graph is related to the number of edge segments and the edge segment correlation coefficient. 
    Finally, we validated through extensive experiments that GHAN outperforms existing state-of-the-art methods.
   
}
\par{
    The main contributions of this paper can be summarized as follows:
    \begin{itemize}
        \item We explore the contribution of common user preferences to improving recommendation performance.
        \item We effectively exploit the potential of hypergraph in SBR to improve the recommendation performance.
        \item We devise a global graph construction method that breaks the limitation of a single relationship of traditional methods.
        \item Our experiments evaluate the recommendation performance of GHAN on three datasets and obtain satisfactory results.
    \end{itemize}
}

\section{Related work}
\label{Related_work}
\subsection{Session-based recommendation}
\par{
    The early development of SBR relied significantly on the availability of neural networks due to their strong feature learning capabilities, 
    of which RNN is one of many branches particularly suited to modeling sequence data \cite{GRU4REC, 10.1145/2988450.2988452, NARM, Quadrana_2017, STAMP, ZHANG2020165}. %RNN methods
    GRU4REC \cite{GRU4REC} integrates RNN into SBR and utilizes Gated Recurrent Unit (GRU) to model session sequences and learn user preferences.
    Then, NARN \cite{NARM} extends the attention mechanism based on GRU4REC.
    A method called STAMP \cite{STAMP} can capture the user's short-term memory, 
    which utilizes the attention mechanism more effectively.
    In addition, CSRM \cite{CSRM} exploits the collaborative information between neighboring sessions and the current session to help prediction, 
    and it builds an Outer Memory Encoder and a fusion gating mechanism in addition to RNN and attention mechanisms to obtain a recommendation score for each item.

    GNN with its ability to capture complex transformation relations, 
    has been widely used in SBR by researchers in recent years \cite{GNN, SR-GNN, TA-GNN, CM-HGNN, RA-GNN, Disen-GNN, MCGNN}. %GNN methods no global graph--no hypergraph
    SR-GNN \cite{SR-GNN} was the first time to combine GNN into SBR, 
    in which a gated graph neural network (GGNN) \cite{GGNN} and an attention mechanism are employed to learn session representations for recommendation.
    Then, TAGNN \cite{TA-GNN} improves prediction by activating different users' interests through target-aware attention. 
    CM-HGNN \cite{CM-HGNN} and MCGNN \cite{MCGNN} improve the model performance by including category information to SBR through heterogeneous graphs.

}
\subsection{Global context learning}
\par{
    Global context learning aims to capture item-transition information from other sessions for learning embedding feature of items, 
    and its effectiveness in SBR is demonstrated by many works \cite{GC-SAN, GCE-GNN, GS-GNN, PA-GNN, E-GNN, CT-GNN, HGCAN, FHGIGC}. %global graph methods
    \cite{GC-SAN} proposed GC-SAN, which implements sequence context representation capability by dynamically constructing the graph structure of session sequences based on the self-attention model.
    Then, \cite{GCE-GNN} proposes GCE-GNN, which conducts context learning by constructing the item transformations of all sessions as a global graph.
    Subsequently, global graphs have been widely used in many works \cite{GS-GNN, PA-GNN, E-GNN, CT-GNN, HGCAN, FHGIGC}. 
    For example, \cite{GS-GNN} proposed GS-GNN to learn the global embedding of items using Graph Attention Networks(GAT) \cite{GAT}.
    \cite{E-GNN} proposed E-GNN, which builds a Weighted Global Item Graph in a way to achieve more effective global context learning.
}
\subsection{Hypergraph learning}
\par{
    Early hypergraph-based work demonstrated the ability to capture complex higher-order relationships that hypergraphs provide \cite{HNN, HGCN, LCN, MRUH, NRHL, NRSH}. % early hypergraph
    In particular, HyperGCN \cite{HGCN} and line hypergraph convolutional networks \cite{LCN} utilize graph convolutional networks (GCN) \cite{GCN} to learn node information on hypergraphs.
    \cite{NRSH} was the most relevant early research to SBR. However, all of them could not be directly applied to SBR scenarios. 
    Until DHCN \cite{DHCN} constructs session data as a hypergraph and designs a hypergraph convolution to capture higher-order information, 
    hypergraphs were first included in SBR.
    Then, FHGIGC \cite{FHGIGC} fuses hypergraph and global context for recommendation.
    SDHID \cite{SDHID} proposed a disentangled capsule hypergraph convolutional channel for ne-grained intent learning, to efficiently capture the transition patterns of intra-session. 
}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=1.0\textwidth]{./figures/graph.drawio.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{The frame of the GHAN} % 图片标题
    \label{FIG:1} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\subsection{Problem definition}
\par{
    The task of session-based recommendation is to generate a unique product recommendation list for each user based on their anonymous session, 
    and to put the products that users are more likely to interact with in the first place.
    Similar to the formulation of related work \cite{GCE-GNN},
    let $V = \{v_1, v_2, \ldots, v_N\}$ be all items, then session $s = \{v^s_1, v^s_2, v^s_3, \ldots, v^s_n\}$ represents the user's click behavior (i.e., items sorted by timestamps) from one item to another.
    The task of session-based recommendation is to predict the probability of the next item$v_{n+1}$ based on the session $s$.
    In practice, we calculate the probability score $\hat{y}=\{\hat{y}_{v_1}, \hat{y}_{v_2}, \ldots, \hat{y}_{v_N}\}$ of all items as the next item $v_{n+1}$.
}
\subsection{Motivation}
\par{
    The motivation for our proposed method is divided into the following points:

    First, the existing global context methods mainly discuss the intrinsic relationship between items and learn the positional information of each user in the global graph based on item modeling.
    We argue that users are more inclined to click on products that are well-received or sell the most.
    Based on the above point of view, we believe that the application graph network learning session-session relational information can enhance the performance of session-based recommendations.
    Second, the global graph construction method of existing methods on item-item does not effectively establish the relationship weight between nodes.
    In this regard, we use the user's transfer information between items to construct an enhanced weight matrix to capture the user's interest target more accurately.
}

\section{Methodology}
\par{
    % In this section, we introduce how the Deep Integration of Contextual Graph Neural Networks for SBR effectively expresses logical contextual relationships of each node through graph construction and adjustment of inter-node weight relationships.
}

\subsection{Graph construction}
\par{
    In this section, we present how to construct a session graph, global graph, and hypergraph. 
    session graph models local preferences and global graph models global preference, 
    both at the item-level. 
    The hypergraph models common user preferences and is at the session-level.

    % 在这章，我们展示如何构造session graph、global graph 和 hypergraph。
    % session graph 为local preferen 建模，global graph为global preference建模，两者都是在item-level进行。
    % hypergraph 为用户共同偏好建模，其在session-level进行。
}
\subsubsection{Session graph}
\par{
    Modeling the session sequence and learning the embedding of each item in the session is one of the basic processes for session-based recommendation.
    Following the previous work \cite{SR-GNN, GCE-GNN}, the sequence of sessions will be constructed as a session graph, 
    which is formulated as follows, given session $s = \{v^s_1, v^s_2, v^s_3, \ldots, v^s_n\}$, 
    having $\mathcal{G}_s = (\mathcal{V}_s, \mathcal{E}_s)$ denoting the session graph, 
    where $ \mathcal{V}_s \subseteq V$ is the item clicked by the user in session $s$, 
    and $\mathcal{E}_s = \{e^s_{in}, e^s_{out}, e^s_{in-out}, e^s_{self}\}$ denotes the four types of edges between two items.

    Self-loop edges with lower weight values are added to all nodes in the session graph to reduce the risk of over-smoothing, 
    and based on the temporal characteristics of session sequences, 
    we slightly up-weight the $e^s_{self}$ edges to enhance the sequential pattern modeling capability.
}

\subsubsection{Global graph}
\par{
    To extract item-item relationships across sessions, we first construct the global graph $\mathcal{G}_g = (V, E)$, 
    $V$ is the set of all independent items, which we use as nodes in the global graph. 
    The transfer relation from item i to item j in each session sequence is recorded as an edge in $E$, 
    where the number of transfers from $v_i$ to $v_j$ is used as the weight of the edge, 
    so the global graph $\mathcal{G}_g$ we construct is a directed weighted graph. 
    In addition, in order to avoid the high space complexity and time complexity caused by too many nodes, 
    we slice the global graph, and the processing algorithm is shown in Algorithm \ref{alg:1}.

    \begin{algorithm}[ht]
        \caption{Slicing algorithm for global graph}
        \label{alg:1}
        \hspace*{0.02in} {\bf Input:}
        session graph $\mathcal{G}_s = (\mathcal{V}_s, \mathcal{E}_s)$ and its adjacency matrix $A_s$, 
        global graph $\mathcal{G}_g = (V, E)$ and its adjacency matrix $A_g$, 
        % scaling weights function $F$.
        % parameters in the model $\Phi$, max training epoch $T$, 
        % batch size $B$, sequences $S$, neighbor set of items $N^g_{vi}$, 
        % Weight of global neighbors $w_i$, 
        % and Index weights generated through time series $w_t$
        \\
        \hspace*{0.02in} {\bf Output:}
        weighted global graph $\mathcal{G}_w = (\mathcal{V}, \mathcal{E})$ and its adjacency matrix $A_w$
        % Model parameters $\Phi$
        \begin{algorithmic}[1]
            \State $\mathcal{V} \leftarrow \varnothing, \mathcal{E} \leftarrow \varnothing, A_w \leftarrow \varnothing$
            \For{$v_i \in \mathcal{V}_s$}
            \State $\mathcal{N}_g(v_i) = \{v_j|v_j \notin \mathcal{V} \ and \ (v_i, v_j) \in E \ or \ (v_j, v_i) \in E\}$
            \State $\mathcal{V} \leftarrow \mathcal{V} \cup \mathcal{N}_g(v_i)$
            \EndFor 
            \For{$\forall (v_i, v_j) \in \mathcal{V}$}
            \If{$(v_i, v_j) \in E$}
            \State $\mathcal{E} \leftarrow \mathcal{E} \cup \{(v_i, v_j)\}$
            \State $a^w_{ij} \leftarrow a^g_{ij}$
            \EndIf
            \EndFor
            \State $A_w = A_w + A_s, A_w = \frac{\ln(A_w)}{\ln(A_g)}$
            \For{$\forall a_{ij} \in A_w$}
            \State $a_{ij} = \frac{e^{a_{ij}}}{\sum_{j=1}^{n}e^{a_{ij}} } (j \in \{1, 2, \ldots, n\})$
            \EndFor
            \State $\mathcal{G}_w \leftarrow (\mathcal{V}, \mathcal{E})$
            \State \Return $\mathcal{G}_w$ and its adjacency matrix $A_w$
        \end{algorithmic}
    \end{algorithm}
    
    The weighted global graph $\mathcal{G}_w = (\mathcal{V}_w, \mathcal{E}_w)$ that we obtain by slicing out the portion of the global graph that corresponds to the session graph is an extended version.
    Specifically, $\mathcal{V}_w = \mathcal{V}_s \cup \mathcal{N}_g(v_i)$ and $\mathcal{E}_w$ is the subset part of $\mathcal{V}_w$ in $E$.
    Finally, when obtaining the set of neighbors $\mathcal{N}_g(v_i)$ of an item $v_i$, 
    we select only a few neighbors with the largest edge weights to avoid invalid information propagation.
    
}

\subsubsection{Hypergraph}
\par{
    To extract the common preferences among different users, we construct a hypergraph for sessions to learn cross-session relationships.
    Formally, let $S = \{s_1, s_2, \ldots, s_m\}$ be the set of all sessions.
    We have $\mathcal{G}_h = (S, \mathcal{E}_h)$ denoting the hypergraph where $\mathcal{E}_h = \{e^h_{p,q}|(s_p, s_q)|s_p, s_q \in S\}$ is the set of edges.
    Then, we build an edge for session $s_p$ and session $s_q$ with the same item, 
    where the number of identical items determines the edge weight, i.e.,$\omega_{p,q} = \frac{s_p \cap s_q}{s_p \cup s_q}$.
    Therefore, $\mathcal{G}_h$ is an undirected weighted graph. 
    However, too many nodes in the hypergraph can lead to excessive space complexity. 
    For this problem, we set $S \in \mathcal{G}_h$ to the number of sessions in the batch of model training inputs.
    Note that the edges of the hypergraph are undirected, which indicates that there is no sequential relationship between sessions, 
    consistent with the logic of the relationships of different users. 
    So, the hypergraph describes the session-level relations that are also termed cross-session information.
}

\subsection{Item embedding learning for local preference}
\par{
    We first encode item $v_i$ into a uniform $d$ dimensional embedding space, i.e., $\mathbf{h}_{v_i} \in R^d$, to represent its hidden feature.
    Subsequently, we utilize the attention mechanism in session graph $\mathcal{G}_s = (\mathcal{V}_s, \mathcal{E}_s)$ to learn the user's local preference.
    The first step in the attention mechanism is to compute the related weight between a node and its neighboring nodes, 
    which we implement by element-wise product and non-linear transformation:
    \begin{align}
        e_{i,j} = \operatorname{LeakyReLU}\left(\mathbf{W}^{\ast}\left(\mathbf{h}_{v_{i}} \odot \mathbf{h}_{v_{j}}\right)\right).
    \end{align}
    $\operatorname{LeakyReLU}$ is the activation function, $\mathbf{W}^{\ast} \in R^{1 \times d}$ is the relational weight matrix. 
    For different $\{e^s_{in}, e^s_{out}, e^s_{in-out}, e^s_{self}\}$ connected neighboring nodes $\mathcal{N}_{v_i}$, i.e., only first-order neighbor, 
    we utilize the $\{\mathbf{W}_{in}, \mathbf{W}_{out}, \mathbf{W}_{in-out}, \mathbf{W}_{self}\}$ corresponding to learn the different related weight.
    Then, the related weight is normalized by the Softmax function:
    \begin{align}
        \alpha_{i,j} = \frac{\exp\left(e_{i,j}\right)}{\sum_{v_j \in \mathcal{N}_{v_i}}\exp\left(e_{i,j}\right)}.
    \end{align}

    Finally the output features of each node are obtained by linear combination of related weight and neighbor embedding features:
    \begin{align}
        \mathbf{h}^s_{v_i} = \sum_{v_j \in \mathcal{N}_{v_i}} \alpha_{i,j} \mathbf{h}_{v_j}.
    \end{align}
}

\subsection{Item embedding learning for global preference}
\par{
    We design a $k$-layer Weighted global graph attention network (WG-GAT) to learn the global neighbor information of each node in a weighted global graph. 
    Such a design enables higher-order relational information propagation, 
    which means that nodes can learn by perceiving each other over two or more hops, while the weights are designed to effectively filter the propagation of irrelevant information. 
    Each layer of WG-GAT is divided into two parts: Attention coefficient computing and Information aggregation.
    
    \textbf{Attention coefficient computing:}We first obtain a vector of neighbor information for each item $v_i$ with its $\mathcal{N}_g(v_i)$ weight $w_{i,j}$ by linear combination:
    \begin{align}
        \mathbf{v}^{(k - 1)}_i = \frac{1}{\sum_{v_j \in \mathcal{N}_g(v_i)}^{} w_{i,j}} \sum_{v_j \in \mathcal{N}_g(v_i)}^{} w_{i,j} \mathbf{h}^{(k - 1)}_{v_j},
    \end{align}
    where $\mathcal{N}_g(v_i)$ is the set of neighbor nodes of item $v_i$ in $\mathcal{G}_w$.

    Then, the related weights of item and its neighbor information vector are calculated by the following formulation:
    \begin{align}
        e^{(k - 1)}_{i} = \mathbf{q}^{\mathsf{T}}_{1} \operatorname{LeakyReLU}\left ( \left (\mathbf{W}_1 \mathbf{h}^{(k - 1)}_{v_i} \right ) \odot \left (\mathbf{W}_2 \mathbf{v}^{(k - 1)}_i \right ) \right ),
    \end{align}
    here we choose $\operatorname{LeakyReLU}$ as the activation function, 
    $\mathbf{q}_{1} \in R^{d}$ and $\mathbf{W}_1, \mathbf{W}_2 \in R^{d \times d}$ are trainable parameters, 
    $\odot$ indicates element-wise product.

    \textbf{Information aggregation:}In the next step, we aggregate the item embedding and its neighbor information vectors to get the output of WG-GAT, which is calculated as follows:
    \begin{align}
        \mathbf{h}^{(k)}_{v_i} = \operatorname{relu} \left (\mathbf{W}_3 \left [h^{(k - 1)}_{v_i} || e^{(k - 1)}_{i} \mathbf{v}^{(k - 1)}_i \right ] \right ),
    \end{align}
    where $\mathbf{W}_1 \in R^{d \times 2d}$ is a linear transformation matrix.

    The output of the first layer of WG-GAT gets the item embedding depends only on its immediate neighbors, 
    the second-order neighbor relationship in the second layer of WG-GAT is propagated through the intermediary nodes on top of the first layer, 
    and the multilayered WG-GAT enables the item to learn the information more widely.
    However, the increased aggregation information carries over-smoothing risk, 
    which we address by averaging the output of each layer through mean pooling to get item embedding as the final feature:
    \begin{align}
        \mathbf{h}^g_{v_i} = \frac{1}{k + 1} \sum_{i=0}^{k} \mathbf{h}^{(i)}_{v_i}.
    \end{align}

}

\subsection{Session representation learning}
\par{
    Through the above methods, we have item embedding hidden feature in local preference and global preference. 
    Next, we fuse the two by sum with a trainable weight parameter $\lambda_1$:
    \begin{align}
        \mathbf{h}^{\prime}_{v_i} = \lambda_1 \mathbf{h}^s_{v_i} + (1 - \lambda_1) \mathbf{h}^{g}_{v_i}.
    \end{align}

    Following prior research \cite{GCE-GNN}, 
    we utilize a learnable position embedding matrix $\mathbf{P} = [\mathbf{p}_1, \mathbf{p}_2, \ldots, \mathbf{p}_n]$ to learn the order relations of the items in the session, 
    where $\mathbf{p}_i \in R^d$ is a position vector for the particular position $i$:
    \begin{align}
        \mathbf{r}_i = tanh\left(\mathbf{W}_3\left[\mathbf{h}^{\prime}_{v_i} || \mathbf{p}_{n - i + 1}\right] + \mathbf{b}_1\right),
    \end{align}
    where $\mathbf{W}_3 \in R^{d \times 2d}$ and $\mathbf{b}_1 \in R^d$ are trainable parameters, $||$ indicates vector concatenation.
    Then, we obtain the session information by averaging all item embedding:
    \begin{align}
        \mathbf{s} = \frac{1}{n} \sum^n_{i=1} h^{\prime}_{v_i}.
    \end{align}

    Next, a soft-attention mechanism is used to learn the correlation weight of each item with the session information:
    \begin{align}
        \beta_i = \mathbf{q}^{\mathsf{T}}_{2} \sigma (\mathbf{W}_4 \mathbf{r}_i + \mathbf{W}_5 \mathbf{s} + \mathbf{b}_2),
    \end{align}
    where $\mathbf{W}_4, \mathbf{W}_5 \in R^{d \times d}$ and $\mathbf{q}_2, \mathbf{b}_2 \in R^{1 \times d}$ are learnable parameters. 
    Then, we use linear combination to obtain the session representation $\mathbf{h}_s$, which reflects the user's overall preference.
    \begin{align}
        \mathbf{h}_s = \sum^n_{i=1} \beta_i \mathbf{h}^{\prime}_{v_i}.
    \end{align}
}
\par{
    The most of existing methods \cite{SR-GNN, TA-GNN, PA-GNN, GCE-GNN, CM-HGNN} make predictions directly after obtaining the output session representation, 
    and the common preferences among users are not mined. 
    In this regard, we propose to build a hypergraph at session-level and solve this problem by aggregating information from nodes on it.

    In practice, we propose a Line convolution network (LCN) to learn the relationship between a session and its neighboring sessions.
    Here we still use a multilayer structure to learn higher-order relational information.
    In LCN, we first have $\mathcal{G}_h$ and obtain from it the adjacency matrix $A_h$ and the degree matrix $D$.
    Then, the LCN is defined as:
    \begin{align}
        \mathbf{h}^{(l)}_{s} = D^{-1} A_h \mathbf{h}^{(l - 1)}_{s}.
    \end{align}
    Next, we obtain the final session representation $\mathbf{h}_c$ by averaging the output of each LCN layer, which is implemented as follows:
    \begin{align}
        \mathbf{h}_c = \frac{1}{l+1} \sum^{l}_{i=0} \mathbf{h}^{(i)}_{s}.
    \end{align}
}
\subsection{Prediction}
\par{
    After obtaining the final session representation, 
    we multiply it with the initial embedding of all items to obtain the probability of each item being the next item in the session:
    \begin{align}
        \hat{\mathbf{y}}_i = \operatorname{Softmax}\left(\mathbf{h}_c \mathbf{h}^\top_{v_i}\right).
    \end{align}
    We employ the cross-entropy loss function to compute the discrepancy between predicted values and ground truth. The formula is as follows:
    \begin{align}
        \mathcal{L} (\hat{\mathbf{y}}) = 
        -\sum^m_{i = 1}\mathbf{y}_i \mathrm{log}(\hat{\mathbf{y}_i}) +
         (1 - \mathbf{y}_i)\mathrm{log}(1 - \hat{\mathbf{y}_i}),
    \end{align}
    where $\mathbf{y}$ denotes the one-hot encoding vector of the ground truth item.
}

\section{Experiments}
\subsection{Datesets and Preprocessing}
\par{
    We evaluate the recommendation performance of GHAN by experimenting on three datasets, 
    they are Diginetica \footnote[1]{https://competitions.codalab.org/competitions/11161}, 
    Tmall \footnote[2]{https ://tianchi.aliyun.com/dataset/dataDetail?dataId=42} and Nowplaying \footnote[3]{http://nowplaying.uibk.ac.at/\#nowplaying}.

    Following \cite{GCE-GNN}, we preprocess the data from all three datasets. 
    Specifically, sessions containing only one item, and items with fewer than five occurrences will be excluded from the dataset.
    Similar to \cite{STAMP}, we set last week's session as the test data and the remained historical data for training.
    In addition, we use a data-enhanced approach to sessions.
    For instance, for a session $s = \{v_1, v_2, \ldots, v_n\}$, we generate sequences and corresponding labels, 
    i.e., $([v_1], v_2), ([v_1, v_2], v_3), \ldots, ([v_1, v_2, \ldots, v_{n-1}], v_n)$.
    The statistics of the preprocessed datasets are summarized in Table \ref{table:2}
}

\begin{table}[ht]
    \caption{Dataset statistical information}
    \centering
    \setlength{\tabcolsep}{16pt}
    \renewcommand{\arraystretch}{1.3}
        {\fontsize{10}{13}\selectfont
            \begin{tabular}{llll}
            \hline
            Statistics & Diginetica & Tmall & Nowplaying \\ 
            \hline
            \#clicks & 982,962 & 818,479 & 1,367,963 \\ 
            \#training sessions & 719,470 & 351,268 & 825,304 \\ 
            \#test sessions & 60,858 & 25,898 & 89,824 \\ 
            \#items & 43,097 & 40,728 & 60,417 \\ 
            average length & 5.12 & 6.69 & 7.42 \\ 
            \hline
        \end{tabular}
        }
        \label{table:2}
\end{table}

\subsection{Baseline methods}
\par{
    POP: It recommends items based on popularity.

    Item-KNN \cite{Item-KNN}: It recommends items similar to those previously interacted with in the current session.
    
    FPMC \cite{FPMC}: It recommends items for session sequences using a combination of Markov chains and matrix factorization.
    
    GRU4REC \cite{GRU4REC}: This model uses RNN aggregated information to model session sequences and make recommendations.
    
    NARM \cite{NARM}: It extends GRU4Rec by employing an attention mechanism to extract the user's main direction of interest.
    
    STAMP \cite{STAMP}: This model utilizes attention network to capture users' short-term interests.
    
    SR-GNN \cite{SR-GNN}: It learns item embedding through GNN on the session graph transferred from the session sequence, and then learns session representations using attentional mechanisms.

    GCE-GNN \cite{GCE-GNN}: This method learns session representations by integrating local graph and global graph.

    DHCN \cite{DHCN}: This method uses hypergraph and linegraph to learn higher-order relations and incorporates self-supervised methods to enhance session recommendations.

    % FSM (\citeauthor{FSM}, \citeyear{FSM}): It utilizes frequent sub-sequences to build global session graph for recommendation.

    % CGSNet (\citeauthor{CGSNet}, \citeyear{CGSNet}): It integrating three graph encoders for varied item transitions and enhancing session representation via attention-based fusion and contrastive learning.

    % CM-HGNN (\citeauthor{CM-HGNN}, \citeyear{CM-HGNN}): It leveraging item-category relations to enhance session representation through multi-relation heterogeneous graph convolutions.

    % MCGNN (\citeauthor{MCGNN}, \citeyear{MCGNN}): It learns category-item, category-category, item-item and similarity information between sessions.
    % HyperS2Rec (\citeauthor{HyperS2Rec}, \citeyear{HyperS2Rec}): It combines hypergraph convolutional networks and gated recurrent units to learn dual item embeddings for recommendation.
}

\subsection{Evaluation metrics}
\par{
    We utilize two mainstream metrics, 
    P@K (Precision) and M@K (Mean Reciprocal Rank). 
    P@K refers to the proportion of correct items among the top K items with the highest predicted sequence probability. 
    M@K is the average of the reciprocal ranks of correct items among the top K items with the highest predicted probabilities. 
    If there are no correct items among the top K, it is taken as 0 \cite{GCE-GNN, CM-HGNN}.
}

\subsection{Parameter configuration}
\par{
    In our experiments, for comparison with other methods \cite{SR-GNN, GCE-GNN, DHCN}, 
    the item embedding dimension $d$ is set to 100, the mini-batch size is 100, 
    and the Adam optimizer is used, with an initial learning rate of 0.001 and a decay of 0.1 for every $3$ epochs. 
    The $L_2$ penalty is $10^{-5}$. For GCE-GNN, we set hop $k$ to 1 for all datasets and the best dropout rate is searched in $[0.1, 0.3, 0.5, 0.7]$. 
    All parameters are initialized with a Gaussian distribution and are guaranteed to have a mean of 0 and a standard deviation of 0.1. 
    For DHCN, we use a $l$ layer LCN for the hypergraph.

    For our proposed GHAN, the best values of the layer $k$ for WG-GAT and the layer $l$ for LCN are searched in $[1, 2, 3, 4, 5]$.
}

\begin{table}[ht]
    \centering
    \setlength{\tabcolsep}{2pt}
    % \captionsetup{justification=raggedright, format=plain}
    \caption{Comparison with other baselines}
        \renewcommand{\arraystretch}{1.5}
        % {\fontsize{6}{10}\selectfont
        \begin{tabular}{lllllllllllll}
        \hline 
        \multirow{2}[0]{*}{Method} & \multicolumn{4}{c}{Diginetica} & \multicolumn{4}{c}{Tmall} & \multicolumn{4}{c}{Nowplaying} \\
        \cmidrule(r){2-5} \cmidrule(r){6-9} \cmidrule(r){10-13}
        & P@10 & M@10 & P@20 & M@20 & P@10 & M@10 & P@20  & M@20 & P@10 & M@10 & P@20 & M@20 \\ 
        \hline
        POP & 0.76 & 0.26 & 1.18 & 0.28 & 1.67 & 0.88 & 2.00 & 0.90 & 1.86 & 0.83 & 2.28 & 0.86 \\
        Item-KNN & 25.07 & 10.77 & 35.75 & 11.57 & 6.65 & 3.11 & 9.15 & 3.31 & 10.96 & 4.55 & 15.94 & 4.91 \\
        FPMC & 15.43 & 6.20 & 26.53 & 6.95 & 13.10 & 7.12 & 16.60 & 7.32 & 5.28 & 2.68 & 7.36 & 2.82 \\
        GRU4REC & 17.93 & 7.33 & 29.45 & 8.33 & 9.47 & 5.78 & 10.93 & 5.89 & 6.74 & 4.40 & 7.92 & 4.48 \\
        NARM & 35.44 & 15.13 & 49.70 & 16.17 & 19.17 & 10.42 & 23.30 & 10.70 & 13.6 & 6.62 & 18.59 & 6.93 \\
        STAMP & 33.98 & 14.26 & 45.64 & 14.32 & 22.63 & 13.12 & 26.47 & 13.36 & 13.22 & 6.57 & 17.66 & 6.88 \\
        SR-GNN & 36.86 & 15.52 & 50.73 & 17.59 & 23.41 & 13.45 & 27.57 & 13.72 & 14.17 & 7.15 & 18.87 & 7.47 \\
        GCE-GNN & 41.16 & 18.15 & 54.22 & 19.04 & 28.01 & 15.08 & 33.42 & 15.42 & 16.94 & 8.03 & 22.37 & 8.40 \\
        DHCN & 40.21 & 17.59 & 53.66 & 18.51 & 26.22 & 14.60 & 31.42 & 15.05 & 17.35 & 7.87 & 23.50 & 8.18 \\
        % FSM & 39.03 & 17.11 & 52.03 & 18.01 & 28.28 & 16.53 & 33.38 & 16.89 & 15.26 & 7.97 & 20.24 & 8.31 \\
        % CGSNet & 41.56 & 18.28 & 54.69 & 19.19 & 29.72 & 16.06 & 34.69 & 16.41 & \underline{17.83} & 8.05 & 23.30 & 8.44 \\
        % HyperS2Rec & 40.52 & 18.09 & 54.13 & 18.91 & 27.26 & 14.98 & 32.91 & 15.39 & 17.40 & 7.62 & 23.01 & 8.01 \\
        % CM-HGNN & 41.74 & 18.29 & 55.04 & 19.35 & 31.63 & 16.61 & 37.92 & 17.18 & 17.69 & 8.13 & 24.13 & 8.64 \\
        % MCGNN & 46.05 & 20.59 & 59.15 & 21.50 & 32.31 & 18.49 & 38.11 & 18.91 & 18.62 & 8.83 & 24.82 & 9.26 \\
        \hline
        GHAN & \textbf{52.82} & \textbf{23.99} & \textbf{65.74} & \textbf{24.89} & \textbf{37.75} & \textbf{20.59} & \textbf{44.77} & \textbf{21.08} & \textbf{29.01} & \textbf{12.26} & \textbf{38.06} & \textbf{12.89} \\
        \hline
        \end{tabular}
        % }
    \label{table:3}
\end{table}

\subsection{Comparison with baselines}
\par{
    As shown in Table \ref{table:3}, we present the results of the baseline methods and our proposed method on three real-world datasets, 
    where the best results for each metric are highlighted in boldface.

}
\par{
    In all the methods presented, POP is the least effective in recommending items due to the fact that it only recommends the most popular items. 
    In compare to POP, Item-KNN learns the items that users interacted with in the past and FPMC utilizes first-order Markov chains and matrix factorization, 
    both of which proved their respective effectiveness.
    GRU4REC is the first to integrate RNN into SBR, and its demonstrated recommendation performance proves that session sequences can be modeled by RNN. 
    However, relying on RNN alone does not achieve better results. 
    NARM incorporates the attention mechanism on top of GRU4REC, which usually takes the last item in the sequence, i.e., the item that the user interacted with most recently, 
    as the attention, and its obtained results show that the attention head can most likely represent the user's preference. 
    Subsequently, STAMP learns users' long and short-term interests respectively on the attention mechanism, and its recommendation performance outperforms NARM on Tmall, 
    proving the effectiveness of assigning different weights to different items. 

    GNN-based methods are generally better than traditional methods on SBR, SR-GNN is the first method that integrates GNN and attention mechanism, 
    which performs session recommendation by modeling session sequences as graphs and utilizing GNN for information propagation and information aggregation, 
    and its results demonstrate the effectiveness of GNN for modeling session sequences.
    GCE-GNN is a GNN-based method for context learning that utilizes a global graph cross sessions and a local graph to learn the item embeddings respectively and integrates the two, 
    which is superior to SR-GNN, 
    indicating the importance of context information for learning user preferences.
    DHCN converts session sequences into hypergraph and Line graph and utilizes GCN to learn item information, 
    as well as Contrastive Learning methods to model high-order correlations between items.

    Our proposed GHAN experimentally outperforms GCE-GNN and DHCN on all three datasets. 
    Compared to the best results of the baseline methods, it improves $27.66\%$ on average on Diginetica, 
    $35.49\%$ on average on Tmall, and $58.82\%$ on average on Nowplaying. 
    These experimental results demonstrate that our proposed global preference learning with WG-GAT and our constructed hypergraph learning on LCN can effectively capture user preferences and significantly improve recommendation performance.

    % 27.66  35.49  58.82
}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=0.8\textwidth]{./figures/Diginetica.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{Performance of the ablation study model on Diginetica} % 图片标题
    \label{FIG:3} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=0.8\textwidth]{./figures/Tmall.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{Performance of the ablation study model on Tmall} % 图片标题
    \label{FIG:4} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=0.8\textwidth]{./figures/Nowplaying.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{Performance of the ablation study model on Nowplaying} % 图片标题
    \label{FIG:5} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\subsection{Ablation study}
\par{
    We conduct ablation experiments on three datasets to analyze the contribution of our proposed WG-GAT and LCN to recommendation performance. 
    Specifically, we design three comparison models:
    
    \begin{itemize}
        \item GHAN w/o-WG-GAT: GHAN excludes WG-GAT and global graph, which contains local preference and cross session high-order relational information.
        \item GHAN w/o-LCN: GHAN excludes hypergraph and LCN, which contains local preference and global preference.
        \item GHAN Basics: The most basic version of GHAN with a single session recommendation with only local preference.
    \end{itemize}

    The results of Figures \ref{FIG:3} to \ref{FIG:5} show that models that utilize hypergraph to learn high-order relational information provide a significant improvement in the effectiveness of GHAN, 
    indicating that shared preferences between users learned across sessions can help the model to more accurately predict the products of interest to users. 
    The recommendation performance is further enhanced by the combined effect of global graph and hypergraph, 
    indicating that multi-dimensional feature extraction can express user preferences more effectively.

}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=0.8\textwidth]{./figures/par_1.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{The impact WG-GAT layers $k$.} % 图片标题
    \label{FIG:6} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=0.8\textwidth]{./figures/par_2.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{The impact of LCN layers $l$.} % 图片标题
    \label{FIG:7} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\subsection{Sensitivity analysis}
\subsubsection{The impact of WG-GAT layers $k$}
\par{
    We utilize WG-GAT to learn global preference in the global graph, where the number of layers $k$ of WG-GAT effects the high-order relational information propagation between items. 
    From Fig. 5, we can observe that the best value of $k$ is 3, which is comparable to the effect on Tmall and Nowplaying datasets when $k$ is within $[1, 2]$, 
    indicating that the exploration of higher-order information leads to better recommendation performance. 
    However, the recommendation performance decreases dramatically on the Tmall dataset when $k$ is within $[4, 5]$, 
    revealing that too much higher-order information may introduce noise.

}

\subsubsection{The impact of LCN layers $l$}
\par{
    We utilize LCN to learn cross session high-order relational information on hypergraphs, 
    and the number of layers $l$ of LCN effects the propagation range of the relational information. 
    The results are shown in Fig. 6, where the recommendation performance improves with increasing $l$, 
    but the trend is not significant on the Tmall dataset probably due to the occurrence of noise within the data. 
    This trend indicates that a larger propagation range of high-order relational information can be more effective in learning shared preferences between users and improving recommendation performance.

}

\begin{figure}[htb] % 双栏图片
    \centering % 居中
    \includegraphics[width=0.8\textwidth]{./figures/time.pdf}% 图片地址，可以pdf可以jpg，scale是缩放比例
    \caption{Comparison of training time.} % 图片标题
    \label{FIG:8} % 这里只要改冒号后面的数字，图片几就是几
\end{figure}

\subsection{Training time}
\par{
    We compare the training time of the proposed model with that of the traditional models. 
    The experimental parameters were set to batch size and embedding size of 100, and all GNN layers were 1, 
    running on Nvidia GeForce RTX 4060.
    The experimental results are shown in Figure \ref{FIG:8}.
}
\par{
    SR-GNN is the shortest time method, but the recommendation performance is the lowest. 
    With the introduction of different methods, the model can learn deeper user interests, but the training time is increasing.
    Compared with other methods, although GHAN needs to build a global graph and a hypergraph, 
    it will increase the training time, but it is still within a reasonable range.
}

\section{Conclusion and future work}
\par{
    In this paper, we propose GHAN, 
    which builds relationships between items in different dimensions by constructing global graph, session graph, and hypergraph, 
    and learns item embedding and session representation through WG-GAT and LCN to learn item embedding and session representation.
    The experimental results show that GHAN can effectively learn item embedding and cross session high-order relational information in different dimensions and enhance the accuracy of session recommendation.
    In the future, we will continue to extend and streamline GHAN to build graph structures that are more compatible with user preferences to achieve better recommendation performance.
}

% \begin{table}[h]
% \caption{Caption text}\label{tab1}%
% \begin{tabular}{@{}llll@{}}
% \toprule
% Column 1 & Column 2  & Column 3 & Column 4\\
% \midrule
% row 1    & data 1   & data 2  & data 3  \\
% row 2    & data 4   & data 5\footnotemark[1]  & data 6  \\
% row 3    & data 7   & data 8  & data 9\footnotemark[2]  \\
% \botrule
% \end{tabular}
% \footnotetext{Source: This is an example of table footnote. This is an example of table footnote.}
% \footnotetext[1]{Example for a first table footnote. This is an example of table footnote.}
% \footnotetext[2]{Example for a second table footnote. This is an example of table footnote.}
% \end{table}


% \begin{table}[h]
% \caption{Example of a lengthy table which is set to full textwidth}\label{tab2}
% \begin{tabular*}{\textwidth}{@{\extracolsep\fill}lcccccc}
% \toprule%
% & \multicolumn{3}{@{}c@{}}{Element 1\footnotemark[1]} & \multicolumn{3}{@{}c@{}}{Element 2\footnotemark[2]} \\\cmidrule{2-4}\cmidrule{5-7}%
% Project & Energy & $\sigma_{calc}$ & $\sigma_{expt}$ & Energy & $\sigma_{calc}$ & $\sigma_{expt}$ \\
% \midrule
% Element 3  & 990 A & 1168 & $1547\pm12$ & 780 A & 1166 & $1239\pm100$\\
% Element 4  & 500 A & 961  & $922\pm10$  & 900 A & 1268 & $1092\pm40$\\
% \botrule
% \end{tabular*}
% \footnotetext{Note: This is an example of table footnote. This is an example of table footnote this is an example of table footnote this is an example of~table footnote this is an example of table footnote.}
% \footnotetext[1]{Example for a first table footnote.}
% \footnotetext[2]{Example for a second table footnote.}
% \end{table}

% In case of double column layout, tables which do not fit in single column width should be set to full text width. For this, you need to use \verb+\begin{table*}+ \verb+...+ \verb+\end{table*}+ instead of \verb+\begin{table}+ \verb+...+ \verb+\end{table}+ environment. Lengthy tables which do not fit in textwidth should be set as rotated table. For this, you need to use \verb+\begin{sidewaystable}+ \verb+...+ \verb+\end{sidewaystable}+ instead of \verb+\begin{table*}+ \verb+...+ \verb+\end{table*}+ environment. This environment puts tables rotated to single column width. For tables rotated to double column width, use \verb+\begin{sidewaystable*}+ \verb+...+ \verb+\end{sidewaystable*}+.

% \begin{sidewaystable}
% \caption{Tables which are too long to fit, should be written using the ``sidewaystable'' environment as shown here}\label{tab3}
% \begin{tabular*}{\textheight}{@{\extracolsep\fill}lcccccc}
% \toprule%
% & \multicolumn{3}{@{}c@{}}{Element 1\footnotemark[1]}& \multicolumn{3}{@{}c@{}}{Element\footnotemark[2]} \\\cmidrule{2-4}\cmidrule{5-7}%
% Projectile & Energy	& $\sigma_{calc}$ & $\sigma_{expt}$ & Energy & $\sigma_{calc}$ & $\sigma_{expt}$ \\
% \midrule
% Element 3 & 990 A & 1168 & $1547\pm12$ & 780 A & 1166 & $1239\pm100$ \\
% Element 4 & 500 A & 961  & $922\pm10$  & 900 A & 1268 & $1092\pm40$ \\
% Element 5 & 990 A & 1168 & $1547\pm12$ & 780 A & 1166 & $1239\pm100$ \\
% Element 6 & 500 A & 961  & $922\pm10$  & 900 A & 1268 & $1092\pm40$ \\
% \botrule
% \end{tabular*}
% \footnotetext{Note: This is an example of table footnote this is an example of table footnote this is an example of table footnote this is an example of~table footnote this is an example of table footnote.}
% \footnotetext[1]{This is an example of table footnote.}
% \end{sidewaystable}

% \section{Figures}\label{sec6}

% As per the \LaTeX\ standards you need to use eps images for \LaTeX\ compilation and \verb+pdf/jpg/png+ images for \verb+PDFLaTeX+ compilation. This is one of the major difference between \LaTeX\ and \verb+PDFLaTeX+. Each image should be from a single input .eps/vector image file. Avoid using subfigures. The command for inserting images for \LaTeX\ and \verb+PDFLaTeX+ can be generalized. The package used to insert images in \verb+LaTeX/PDFLaTeX+ is the graphicx package. Figures can be inserted via the normal figure environment as shown in the below example:

% %%=============================================%%
% %% For presentation purpose, we have included  %%
% %% \bigskip command. Please ignore this.       %%
% %%=============================================%%
% \bigskip
% \begin{verbatim}
% \begin{figure}[<placement-specifier>]
% \centering
% \includegraphics{<eps-file>}
% \caption{<figure-caption>}\label{<figure-label>}
% \end{figure}
% \end{verbatim}
% \bigskip
%%=============================================%%
%% For presentation purpose, we have included  %%
%% \bigskip command. Please ignore this.       %%
%%=============================================%%

% \begin{figure}[h]
% \centering
% \includegraphics[width=0.9\textwidth]{fig.eps}
% \caption{This is a widefig. This is an example of long caption this is an example of long caption  this is an example of long caption this is an example of long caption}\label{fig1}
% \end{figure}

%%=============================================%%
%% For presentation purpose, we have included  %%
%% \bigskip command. Please ignore this.       %%
%%=============================================%%
% \bigskip
% \begin{verbatim}
% \begin{algorithm}
% \caption{<alg-caption>}\label{<alg-label>}
% \begin{algorithmic}[1]
% . . .
% \end{algorithmic}
% \end{algorithm}
% \end{verbatim}
% \bigskip
%%=============================================%%
%% For presentation purpose, we have included  %%
%% \bigskip command. Please ignore this.       %%
%%=============================================%%

% You may refer above listed package documentations for more details before setting \verb+algorithm+ environment. For program codes, the ``verbatim'' package is required and the command to be used is \verb+\begin{verbatim}+ \verb+...+ \verb+\end{verbatim}+. 

% Similarly, for \verb+listings+, use the \verb+listings+ package. \verb+\begin{lstlisting}+ \verb+...+ \verb+\end{lstlisting}+ is used to set environments similar to \verb+verbatim+ environment. Refer to the \verb+lstlisting+ package documentation for more details.

% A fast exponentiation procedure:

% \lstset{texcl=true,basicstyle=\small\sf,commentstyle=\small\rm,mathescape=true,escapeinside={(*}{*)}}
% \begin{lstlisting}
% begin
%   for $i:=1$ to $10$ step $1$ do
%       expt($2,i$);  
%       newline() od                (*\textrm{Comments will be set flush to the right margin}*)
% where
% proc expt($x,n$) $\equiv$
%   $z:=1$;
%   do if $n=0$ then exit fi;
%      do if odd($n$) then exit fi;                 
%         comment: (*\textrm{This is a comment statement;}*)
%         $n:=n/2$; $x:=x*x$ od;
%      { $n>0$ };
%      $n:=n-1$; $z:=z*x$ od;
%   print($z$). 
% end
% \end{lstlisting}

% \begin{algorithm}
% \caption{Calculate $y = x^n$}\label{algo1}
% \begin{algorithmic}[1]
% \Require $n \geq 0 \vee x \neq 0$
% \Ensure $y = x^n$ 
% \State $y \Leftarrow 1$
% \If{$n < 0$}\label{algln2}
%         \State $X \Leftarrow 1 / x$
%         \State $N \Leftarrow -n$
% \Else
%         \State $X \Leftarrow x$
%         \State $N \Leftarrow n$
% \EndIf
% \While{$N \neq 0$}
%         \If{$N$ is even}
%             \State $X \Leftarrow X \times X$
%             \State $N \Leftarrow N / 2$
%         \Else[$N$ is odd]
%             \State $y \Leftarrow y \times X$
%             \State $N \Leftarrow N - 1$
%         \EndIf
% \EndWhile
% \end{algorithmic}
% \end{algorithm}

%%=============================================%%
%% For presentation purpose, we have included  %%
%% \bigskip command. Please ignore this.       %%
%%=============================================%%

%%=============================================%%
%% For presentation purpose, we have included  %%
%% \bigskip command. Please ignore this.       %%
%%=============================================%%
% \bigskip
% \begin{tabular}{|l|p{19pc}|}
% \hline
% \verb+thmstyleone+ & Numbered, theorem head in bold font and theorem text in italic style \\\hline
% \verb+thmstyletwo+ & Numbered, theorem head in roman font and theorem text in italic style \\\hline
% \verb+thmstylethree+ & Numbered, theorem head in bold font and theorem text in roman style \\\hline
% \end{tabular}
% \bigskip
%%=============================================%%
%% For presentation purpose, we have included  %%
%% \bigskip command. Please ignore this.       %%
%%=============================================%%


% \begin{theorem}[Theorem subhead]\label{thm1}
% Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. 
% Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. 
% Example theorem text. 
% \end{theorem}

% Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% \begin{proposition}
% Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. 
% Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. 
% \end{proposition}

% Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% \begin{example}
% Phasellus adipiscing semper elit. Proin fermentum massa
% ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend
% at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. 
% \end{example}

% Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% \begin{remark}
% Phasellus adipiscing semper elit. Proin fermentum massa
% ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend
% at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. 
% \end{remark}

% Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% \begin{definition}[Definition sub head]
% Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. 
% \end{definition}

% Additionally a predefined ``proof'' environment is available: \verb+\begin{proof}+ \verb+...+ \verb+\end{proof}+. This prints a ``Proof'' head in italic font style and the ``body text'' in roman font style with an open square at the end of each proof environment. 

% \begin{proof}
% Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. 
% \end{proof}

% Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% \begin{proof}[Proof of Theorem~{\upshape\ref{thm1}}]
% Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. 
% \end{proof}

% \noindent
% For a quote environment, use \verb+\begin{quote}...\end{quote}+
% \begin{quote}
% Quoted text example. Aliquam porttitor quam a lacus. Praesent vel arcu ut tortor cursus volutpat. In vitae pede quis diam bibendum placerat. Fusce elementum
% convallis neque. Sed dolor orci, scelerisque ac, dapibus nec, ultricies ut, mi. Duis nec dui quis leo sagittis commodo.
% \end{quote}

% Sample body text. Sample body text. Sample body text. Sample body text. Sample body text (refer Figure~\ref{fig1}). Sample body text. Sample body text. Sample body text (refer Table~\ref{tab3}). 

% \section{Methods}\label{sec11}

% Topical subheadings are allowed. Authors must ensure that their Methods section includes adequate experimental and characterization data necessary for others in the field to reproduce their work. Authors are encouraged to include RIIDs where appropriate. 

% \textbf{Ethical approval declarations} (only required where applicable) Any article reporting experiment/s carried out on (i)~live vertebrate (or higher invertebrates), (ii)~humans or (iii)~human samples must include an unambiguous statement within the methods section that meets the following requirements: 

% \begin{enumerate}[1.]
% \item Approval: a statement which confirms that all experimental protocols were approved by a named institutional and/or licensing committee. Please identify the approving body in the methods section

% \item Accordance: a statement explicitly saying that the methods were carried out in accordance with the relevant guidelines and regulations

% \item Informed consent (for experiments involving humans or human tissue samples): include a statement confirming that informed consent was obtained from all participants and/or their legal guardian/s
% \end{enumerate}

% If your manuscript includes potentially identifying patient/participant information, or if it describes human transplantation research, or if it reports results of a clinical trial then  additional information will be required. Please visit (\url{https://www.nature.com/nature-research/editorial-policies}) for Nature Portfolio journals, (\url{https://www.springer.com/gp/authors-editors/journal-author/journal-author-helpdesk/publishing-ethics/14214}) for Springer Nature journals, or (\url{https://www.biomedcentral.com/getpublished/editorial-policies\#ethics+and+consent}) for BMC.

% \section{Discussion}\label{sec12}

% Discussions should be brief and focused. In some disciplines use of Discussion or `Conclusion' is interchangeable. It is not mandatory to use both. Some journals prefer a section `Results and Discussion' followed by a section `Conclusion'. Please refer to Journal-level guidance for any specific requirements. 

% \section{Conclusion}\label{sec13}

% Conclusions may be used to restate your hypothesis or research question, restate your major findings, explain the relevance and the added value of your work, highlight any limitations of your study, describe future directions for research and recommendations. 

% In some disciplines use of Discussion or 'Conclusion' is interchangeable. It is not mandatory to use both. Please refer to Journal-level guidance for any specific requirements. 

% \backmatter

% \bmhead{Supplementary information}

% If your article has accompanying supplementary file/s please state so here. 

% Authors reporting data from electrophoretic gels and blots should supply the full unprocessed scans for key as part of their Supplementary information. This may be requested by the editorial team/s if it is missing.

% Please refer to Journal-level guidance for any specific requirements.

\bmhead{Acknowledgements}
    This work was supported by National Natural Science Foundation of China (62366016, 72261018, 62266020), 
    Science and Technology Project of Jiangxi Provincial Department of Education (GJJ2200839), 
    Doctoral Initiation Special of Jiangxi University of Science and Technology (205200100659), 
    Jiangxi Provincial Key Laboratory of Multidimensional Intelligent Perception and Control of China, 
    and Jiangxi Provincial Natural Science Foundation under Grant (20224BAB212008, 20224BAB202002).
% Acknowledgements are not compulsory. Where included they should be brief. Grant or contribution numbers may be acknowledged.
\bmhead{Author Contributions}
\par{
    Conceptualization, Methodology, Hui Wang.;
    Software, Resources, Junjie You.;
    Project administration, Jianbing Yi.;
    Validation, Junyan Liu.;
    writing Junjie You and Runjie Huang.
    All authors have read and agreed to the published version of the manuscript.
}
% Please refer to Journal-level guidance for any specific requirements.

\section*{Declarations}
\textbf{Conflicts of Interest} The authors declare no conflict of interest.
% Some journals require declarations to be submitted in a standardised format. Please check the Instructions for Authors of the journal to which you are submitting to see if you need to complete this section. If yes, your manuscript must contain the following sections under the heading `Declarations':

% \begin{itemize}
% \item Funding
% \item Conflict of interest/Competing interests (check journal-specific guidelines for which heading to use)
% \item Ethics approval and consent to participate
% \item Consent for publication
% \item Data availability 
% \item Materials availability
% \item Code availability 
% \item Author contribution
% \end{itemize}

% \noindent
% If any of the sections are not relevant to your manuscript, please include the heading and write `Not applicable' for that section. 

% %%===================================================%%
% %% For presentation purpose, we have included        %%
% %% \bigskip command. Please ignore this.             %%
% %%===================================================%%
% \bigskip
% \begin{flushleft}%
% Editorial Policies for:

% \bigskip\noindent
% Springer journals and proceedings: \url{https://www.springer.com/gp/editorial-policies}

% \bigskip\noindent
% Nature Portfolio journals: \url{https://www.nature.com/nature-research/editorial-policies}

% \bigskip\noindent
% \textit{Scientific Reports}: \url{https://www.nature.com/srep/journal-policies/editorial-policies}

% \bigskip\noindent
% BMC journals: \url{https://www.biomedcentral.com/getpublished/editorial-policies}
% \end{flushleft}

% \begin{appendices}

% \section{Section title of first appendix}\label{secA1}

% An appendix contains supplementary information that is not an essential part of the text itself but which may be helpful in providing a more comprehensive understanding of the research problem or it is information that is too cumbersome to be included in the body of the paper.

%%=============================================%%
%% For submissions to Nature Portfolio Journals %%
%% please use the heading ``Extended Data''.   %%
%%=============================================%%

%%=============================================================%%
%% Sample for another appendix section			       %%
%%=============================================================%%

%% \section{Example of another appendix section}\label{secA2}%
%% Appendices may be used for helpful, supporting or essential material that would otherwise 
%% clutter, break up or be distracting to the text. Appendices can consist of sections, figures, 
%% tables and equations etc.

% \end{appendices}

%%===========================================================================================%%
%% If you are submitting to one of the Nature Portfolio journals, using the eJP submission   %%
%% system, please include the references within the manuscript file itself. You may do this  %%
%% by copying the reference list from your .bbl file, paste it into the main manuscript .tex %%
%% file, and delete the associated \verb+\bibliography+ commands.                            %%
%%===========================================================================================%%

\bibliography{sn-bibliography}% common bib file
%% if required, the content of .bbl file can be included here once bbl is generated
%%\input sn-article.bbl
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatletter

\end{document}
